1. Field of the Invention
The present invention relates to an image processing method and an image processing apparatus, and particularly relates to an image processing method and an image processing apparatus which can acquire a target image after background noise removing.
2. Description of the Prior Art
In recent years, an auto clean apparatus (ex. a clean robot) becomes more and more popular. Via using theses auto clean apparatus, the clean activities can be performed even the user is not there. Such apparatus can be charged by a charging base when it does not perform a clean operation. Also, the auto clean apparatus will leave the charging base to perform a clean operation if it senses nearby environment is dirty, or to perform a clean operation at a predetermined timing. The auto clean apparatus goes back to the charging base if the clean operation is accomplished. Therefore, the auto clean apparatus must have a function of distance measuring, to measure a distance between the auto clean apparatus and nearby objects (ex. a wall, a chair). If the auto clean apparatus does not have a function of distance measuring, the auto clean apparatus may knock against the object, such that the auto clean apparatus or the object may be damaged.
The auto clean apparatus always comprises a distance measuring apparatus to measure the distance, which can apply a plurality of mechanisms to measure the distance. One of the mechanisms is measuring the distance based on images. For such mechanism, the distance measuring apparatus comprises an image sensor to acquire a plurality of images of a target object (ex. wall), and then computes a distance according to these images. For example, the distance is computed according to a distance, an angle or deformation for the image object in the images.
However, the captured images may be disturbed by nearby environment (ex. environment light), such that error may occurs while computing a distance. In order to solve such problem, a step of “background noise removing” can be performed to the captured image to calibrate the captured image, and then the distance is computed according to the calibrated image. Normally, a light source is applied to emit light to a target object and then an image A is captured, then an image B is captured without emitting light, and then a target image after background noise removing is acquired via subtracting the B image from the A image. After that, the target image after background noise removing is applied for the computing of the distance. However, some problems may occur while such background noise removing step is performed while the auto clean apparatus is moving and the frame rate is high.
FIG. 1A is a schematic diagram illustrating that an auto clean apparatus gradually moves away from a target object W. In the example of FIG. 1A, the auto clean apparatus R gradually moves away from the target object W (ex. a wall). Therefore, as illustrated in FIG. 1A, ranges for the captured images are different. The captured images are respectively f1, f2 and f3 while the auto clean apparatus R is at the locations P1, P2 and P3. Also, the light source turns on if the auto clean apparatus R is at the locations P1, P3, and the light source turns off if the auto clean apparatus R is at the locations P2. Therefore, the target image after background noise removing can be acquired via subtracting the image f2 from the image f3. However, ranges for the captured images when the auto clean apparatus R is at the locations P2 and P3 are different, thus the image f2 contains information fewer than which of the image f3 (indicated by the region marked by slant lines in FIG. 1B). Also, the sizes for image objects Ob1, Ob2 may be different, thus a wrong target image may be acquired while removing background information.
Similar problems may occur when the auto clean apparatus R moves relative to the target object W (in parallel or with an angle) or rotates. FIG. 2A is a schematic diagram illustrating a conventional auto clean apparatus moves relative to the target object W, and FIG. 2B is a schematic diagram illustrating how to acquire a target image after background noise removing in the example depicted in FIG. 2A. As illustrated in FIG. 2B, the auto clean apparatus R moves relative to the target object W and respectively captures images f1, f2, f3 for locations P1, P2, P3. The light source provided therein turns on if the auto clean apparatus R is at the locations P1, P3, and the light source turns off if the auto clean apparatus R is at the locations P2. Accordingly, a subtracting step is performed to images f2, f3 to acquire the target image after background noise removing. However, the images f2, f3 contains different content. As illustrated in FIG. 2B, the image f2 contains objects ob1, ob2, but the image f3 only contains the object ob2. Accordingly, if a subtracting step is performed to images f2 and f3 to acquire the target image after background noise removing, a wrong target image may be acquired and a wrong distance is acquired. The situations in FIGS. 2A and 2B may occur while the auto clean apparatus R rotates.
In view of above-mentioned description, a wrong target image may be acquired thus a wrong distance is acquired due to movement of the auto clean apparatus, if a conventional background noise removing step is applied. Such problem becomes more serious if the auto clean apparatus moves with a high speed or a high frame rate (i.e. an image capture frequency).